#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main()
{
	int i = 0;
	int n;
	
	scanf("%d", &n);
	
	int flag = -1;
	double result = 0;
	
	for(i = 1; i<= n; i++)
	{
		result = result + flag * pow((1 / (double)i), i);
		flag = -flag;
	}
	
	printf("%lf\n", result);
	return 0;
}
